<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>formatting.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
  </script>

  <script src="static/js/doc.js">
  </script>

  <meta charset="utf8">
</head>

<body onload="prettyPrint()">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">formatting.js</span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Functions for dealing with locale-specific formatting.
  </div>
  

        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_locale_formatting.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
          </ol>
        </div>
</div>

<h2 class="g-first">File Location</h2>
  <div class="g-section g-tpl-20-80">
    <div class="g-unit g-first">
      <div class="g-c-cell code-label">locale/formatting.js</div>
    </div>
  </div>
<hr/>


   
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>


  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.formatDateTime"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">formatDateTime<span class="args">(<span class="arg">pattern</span>,&nbsp;<span class="arg">date</span>,&nbsp;<span class="arg">opt_timeZone</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
      </div>


     <div class="entryOverview">
       Format the given date object into a string representation using pattern
specified.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">pattern</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">Pattern String to specify how the date should be formatted.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">date</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date">Date</a></span></div>
        <div class="entryOverview">Date object being formatted.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_timeZone</span>
        : <div class="fullType"><span class="type"><a href="class_goog_locale_TimeZone.html">goog.locale.TimeZone</a></span></div>
        <div class="entryOverview">optional, if specified, time related fields will be formatted based on its setting.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>&nbsp;
            string representation of date/time.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line38">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.formatNumber"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">formatNumber<span class="args">(<span class="arg">pattern</span>,&nbsp;<span class="arg">value</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
      </div>


     <div class="entryOverview">
       Format the number using given pattern.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">pattern</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">specifies how number should be formatted.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">value</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">The number being formatted.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>&nbsp;
            The formatted string.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line188">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.getDateTimeFormatter"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">getDateTimeFormatter<span class="args">(<span class="arg">pattern</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_locale_DateTimeFormat.html">goog.locale.DateTimeFormat</a></span></div>
      </div>


     <div class="entryOverview">
       Return a  object for specified pattern, that can be used  to
format date object.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">pattern</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">specifies how the date should be formatted.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_locale_DateTimeFormat.html">goog.locale.DateTimeFormat</a></span></div>&nbsp;
            A DateTimeFormat instance for given pattern.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line71">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.getDateTimeParser"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">getDateTimeParser<span class="args">(<span class="arg">pattern</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_locale_DateTimeParse.html">goog.locale.DateTimeParse</a></span></div>
      </div>


     <div class="entryOverview">
       Get a DateTimeParse object that could parse date string using given pattern.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">pattern</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">specifies how the date should be formatted.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_locale_DateTimeParse.html">goog.locale.DateTimeParse</a></span></div>&nbsp;
            A goog.locale.DateTimeParse instance for the given pattern.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line174">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.getNumberFormatter"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">getNumberFormatter<span class="args">(<span class="arg">pattern</span>,&nbsp;<span class="arg">opt_currencyCode</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_locale_NumberFormat.html">goog.locale.NumberFormat</a></span></div>
      </div>


     <div class="entryOverview">
       To obtain a NumberFormat object that can be used for number format/parse.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">pattern</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">number format pattern string.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_currencyCode</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">optional international currency code, it determines the currency code/symbol should be used in format/parse. If not given, the currency code for current locale will be used.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_locale_NumberFormat.html">goog.locale.NumberFormat</a></span></div>&nbsp;
            A goog.locale.NumberFormat instance for the given pattern and currency.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line253">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.getStandardDateTimeFormatter"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">getStandardDateTimeFormatter<span class="args">(<span class="arg">formatType</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_locale_DateTimeFormat.html">goog.locale.DateTimeFormat</a></span></div>
      </div>


     <div class="entryOverview">
       Return a DateTimeFormat object that can be used to format date using a
predefined pattern as identified by &quot;formatType&quot;.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">formatType</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">identifies the predefined pattern string.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_locale_DateTimeFormat.html">goog.locale.DateTimeFormat</a></span></div>&nbsp;
            A DateTimeFormat instance for the predefined format type.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line87">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.getStandardDateTimeParser"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">getStandardDateTimeParser<span class="args">(<span class="arg">formatType</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_locale_DateTimeParse.html">goog.locale.DateTimeParse</a></span></div>
      </div>


     <div class="entryOverview">
       Get a DateTimeParse object that could parse date string using a predefined
pattern type.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">formatType</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">identifies a predefined pattern stored in locale specific repository.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_locale_DateTimeParse.html">goog.locale.DateTimeParse</a></span></div>&nbsp;
            A goog.locale.DateTimeParse instance for the predefined format type.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line160">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.getStandardNumberFormatter"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">getStandardNumberFormatter<span class="args">(<span class="arg">patternType</span>,&nbsp;<span class="arg">opt_currencyCode</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_locale_NumberFormat.html">goog.locale.NumberFormat</a></span></div>
      </div>


     <div class="entryOverview">
       To obtain a NumberFormat object that can be used for number format/parse from
a predefined pattern type.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">patternType</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">identifies a predefined number format pattern.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_currencyCode</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">optional international currency code. It determines the currency code/symbol used in format/parse. If not given, the currency code for current locale will be used.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_locale_NumberFormat.html">goog.locale.NumberFormat</a></span></div>&nbsp;
            A goog.locale.NumberFormat instance for the predefined pattern type and currency code.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line271">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.parseDateTime"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">parseDateTime<span class="args">(<span class="arg">pattern</span>,&nbsp;<span class="arg">text</span>,&nbsp;<span class="arg">start</span>,&nbsp;<span class="arg">date</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
      </div>


     <div class="entryOverview">
       Parse a string using the format as specified in pattern string, and
return date in the passed &quot;date&quot; parameter.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">pattern</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">specifies how the date should be formatted.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">text</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">The string that need to be parsed.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">start</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">The character position in &quot;text&quot; where parse begins.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">date</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date">Date</a></span></div>
        <div class="entryOverview">The date object that will hold parsed value.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>&nbsp;
            The number of characters advanced or 0 if failed.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line106">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.parseNumber"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">parseNumber<span class="args">(<span class="arg">pattern</span>,&nbsp;<span class="arg">text</span>,&nbsp;<span class="arg">opt_pos</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
      </div>


     <div class="entryOverview">
       Parse the given text using specified pattern to get a number.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">pattern</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">tells how the text is constructed.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">text</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">input text being parsed.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_pos</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span></div>
        <div class="entryOverview">optional one element array that holds position information. It tells from where parse should begin. Upon return, it holds parse stop position.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>&nbsp;
            Parsed number, NaN if in error.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line205">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.standardFormatDateTime"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">standardFormatDateTime<span class="args">(<span class="arg">formatType</span>,&nbsp;<span class="arg">date</span>,&nbsp;<span class="arg">opt_timeZone</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
      </div>


     <div class="entryOverview">
       Formats a given date object according to a predefined
date format pattern specified in symbols object.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">formatType</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">Number used to reference predefined pattern.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">date</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date">Date</a></span></div>
        <div class="entryOverview">The date object being formatted.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_timeZone</span>
        : <div class="fullType"><span class="type"><a href="class_goog_locale_TimeZone.html">goog.locale.TimeZone</a></span></div>
        <div class="entryOverview">optional, if specified, time related fields will be formatted based on its setting.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>&nbsp;
            string representation of date/time.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line55">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.standardFormatNumber"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">standardFormatNumber<span class="args">(<span class="arg">patternType</span>,&nbsp;<span class="arg">value</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
      </div>


     <div class="entryOverview">
       Format the number using predefined pattern.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">patternType</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">indentifies a predefined pattern to use.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">value</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">the number being formatted.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>&nbsp;
            The formatted string.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line219">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.standardParseDateTime"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">standardParseDateTime<span class="args">(<span class="arg">formatType</span>,&nbsp;<span class="arg">text</span>,&nbsp;<span class="arg">start</span>,&nbsp;<span class="arg">date</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
      </div>


     <div class="entryOverview">
       Parse a string using a predefined date/time pattern.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">formatType</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">identifies a predefined pattern stored in locale specific repository.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">text</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">The string that needs to be parsed.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">start</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">parse start position in &quot;text&quot;.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">date</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date">Date</a></span></div>
        <div class="entryOverview">used to hold the parsed value.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>&nbsp;
            The number of characters advanced or 0 if failed.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line144">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.standardParseNumber"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">standardParseNumber<span class="args">(<span class="arg">patternType</span>,&nbsp;<span class="arg">text</span>,&nbsp;<span class="arg">opt_pos</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
      </div>


     <div class="entryOverview">
       Parse the given text using a predefined pattern to get a number.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">patternType</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">identifies a predefined pattern to use.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">text</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">the input text being parsed.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_pos</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">optional position information, it holds parse start position in the beginning. If parsing is successful, this position will be updated to the character next to where parsing ends.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>&nbsp;
            Parsed number, 0 if in error.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line236">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.locale.strictParseDateTime"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.locale.</span><span class="entryName">strictParseDateTime<span class="args">(<span class="arg">pattern</span>,&nbsp;<span class="arg">text</span>,&nbsp;<span class="arg">start</span>,&nbsp;<span class="arg">date</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
      </div>


     <div class="entryOverview">
       Parse a string using the format as specified in pattern string, and
return date in the passed &quot;date&quot; parameter.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">pattern</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">specifies how the date should be formatted.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">text</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">The string that need to be parsed.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">start</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">The character position in &quot;text&quot; where parse begins.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">date</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date">Date</a></span></div>
        <div class="entryOverview">used to hold the parsed value.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>&nbsp;
            The number of characters advanced or 0 if failed.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_locale_formatting.js.source.html#line125">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>






      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Directory locale</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">File Reference</h2>
            <div id="sideFileIndex" rootPath="closure/goog" current="locale/formatting.js"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
